using System.ComponentModel.DataAnnotations;

namespace Lzfy_Refund_Service.Models
{
    /// <summary>
    /// UUM用户信息模型
    /// </summary>
    public class UumUser
    {
        /// <summary>
        /// ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Required]
        [StringLength(128)]
        public string UserName { get; set; } = string.Empty;

        /// <summary>
        /// 用户类别
        /// </summary>
        [StringLength(32)]
        public string? PeopleClass { get; set; }

        /// <summary>
        /// 工号
        /// </summary>
        [StringLength(32)]
        public string? PeopleIdentifier { get; set; }

        /// <summary>
        /// 人员姓名
        /// </summary>
        [StringLength(128)]
        public string? PeopleName { get; set; }

        /// <summary>
        /// 人事科室
        /// </summary>
        [StringLength(32)]
        public string? WorkDept { get; set; }

        /// <summary>
        /// 工作岗位
        /// </summary>
        [StringLength(32)]
        public string? WorkPost { get; set; }

        /// <summary>
        /// 职称
        /// </summary>
        [StringLength(64)]
        public string? WorkProfessional { get; set; }

        /// <summary>
        /// 移动电话
        /// </summary>
        [StringLength(32)]
        public string? Mobile { get; set; }

        /// <summary>
        /// 办公电话
        /// </summary>
        [StringLength(32)]
        public string? OfficePhone { get; set; }

        /// <summary>
        /// 电子邮箱
        /// </summary>
        [StringLength(64)]
        public string? Email { get; set; }

        /// <summary>
        /// 用户密码
        /// </summary>
        [StringLength(128)]
        public string? UserPassword { get; set; }

        /// <summary>
        /// 帐号状态：A激活、L锁定、D作废
        /// </summary>
        [StringLength(32)]
        public string? Status { get; set; }

        /// <summary>
        /// 帐号有效期
        /// </summary>
        public DateTime? Expires { get; set; }

        /// <summary>
        /// 帐号删除时间
        /// </summary>
        public DateTime? DeleteTime { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        public int? Creator { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改者
        /// </summary>
        public int? Modifier { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// 拼音码
        /// </summary>
        [StringLength(32)]
        public string? PinyinCode { get; set; }

        /// <summary>
        /// 五笔码
        /// </summary>
        [StringLength(32)]
        public string? WubiCode { get; set; }

        /// <summary>
        /// 职务
        /// </summary>
        [StringLength(32)]
        public string? Duty { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        [StringLength(32)]
        public string? IdNo { get; set; }

        /// <summary>
        /// 上级人员
        /// </summary>
        [StringLength(128)]
        public string? SuperLeader { get; set; }

        /// <summary>
        /// 用户电话
        /// </summary>
        [StringLength(32)]
        public string? UserPhone { get; set; }

        /// <summary>
        /// 退费任务数量
        /// </summary>
        public int? TaskAmount { get; set; }

        /// <summary>
        /// 用户类型
        /// </summary>
        [StringLength(50)]
        public string? UserType { get; set; }

        /// <summary>
        /// 所属支部
        /// </summary>
        [StringLength(100)]
        public string? PartyBranch { get; set; }
    }

    /// <summary>
    /// UUM用户查询请求模型
    /// </summary>
    public class UumUserQueryRequest
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string? UserName { get; set; }
    }

    /// <summary>
    /// UUM用户查询响应模型
    /// </summary>
    public class UumUserQueryResponse
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string Message { get; set; } = string.Empty;

        /// <summary>
        /// 用户数据
        /// </summary>
        public UumUser? Data { get; set; }
    }

    /// <summary>
    /// UUM用户修改请求模型
    /// </summary>
    public class UumUserUpdateRequest
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Required]
        public int Id { get; set; }

        /// <summary>
        /// 退费任务数量
        /// </summary>
        public int? TaskAmount { get; set; }

        /// <summary>
        /// 用户类型
        /// </summary>
        [StringLength(50)]
        public string? UserType { get; set; }

        /// <summary>
        /// 所属支部
        /// </summary>
        [StringLength(100)]
        public string? PartyBranch { get; set; }

        /// <summary>
        /// 用户电话
        /// </summary>
        [StringLength(32)]
        public string? UserPhone { get; set; }
    }

    /// <summary>
    /// UUM用户修改响应模型
    /// </summary>
    public class UumUserUpdateResponse
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string Message { get; set; } = string.Empty;
    }

    /// <summary>
    /// UUM用户搜索请求模型
    /// </summary>
    public class UumUserSearchRequest
    {
        /// <summary>
        /// 人员姓名
        /// </summary>
        [StringLength(128)]
        public string? PeopleName { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(128)]
        public string? UserName { get; set; }

        /// <summary>
        /// 用户类型
        /// </summary>
        [StringLength(50)]
        public string? UserType { get; set; }

        /// <summary>
        /// 所属支部
        /// </summary>
        [StringLength(100)]
        public string? PartyBranch { get; set; }
    }

    /// <summary>
    /// UUM用户搜索响应模型
    /// </summary>
    public class UumUserSearchResponse
    {
        /// <summary>
        /// 是否成功
        /// </summary>
        public bool Success { get; set; }

        /// <summary>
        /// 消息
        /// </summary>
        public string Message { get; set; } = string.Empty;

        /// <summary>
        /// 用户数据列表
        /// </summary>
        public List<UumUserSearchItem> Items { get; set; } = new List<UumUserSearchItem>();

        /// <summary>
        /// 总数量
        /// </summary>
        public int TotalCount { get; set; }
    }

    /// <summary>
    /// UUM用户搜索结果项
    /// </summary>
    public class UumUserSearchItem
    {
        /// <summary>
        /// ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; } = string.Empty;

        /// <summary>
        /// 人员姓名
        /// </summary>
        public string? PeopleName { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        public string? IdNo { get; set; }

        /// <summary>
        /// 用户电话
        /// </summary>
        public string? UserPhone { get; set; }

        /// <summary>
        /// 退费任务数量
        /// </summary>
        public int? TaskAmount { get; set; }

        /// <summary>
        /// 用户类型
        /// </summary>
        public string? UserType { get; set; }

        /// <summary>
        /// 所属支部
        /// </summary>
        public string? PartyBranch { get; set; }
    }
}